package com.changfeng.controller;

import com.changfeng.bean.dto.vo.MenuTopVO;
import com.changfeng.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/menu")
public class MenuController {

    @Autowired
    private MenuService menuService;

    @GetMapping("/getMenu")
    public List<MenuTopVO> getMenu() {
        return menuService.findByPowerId();
    }
}
